package itdfq.ydd.Behavior_Patters.zhizelian;

/**
 * @Author GocChin
 * @Date 2021/5/3 19:24
 * @Blog: itdfq.com
 * @QQ: 909256107
 */
public class Monther extends Parentes{
    @Override
    public void handRequest(GoShopping goShopping) {
        if (goShopping.getMoney()>=100){
            System.out.println("妈妈给"+goShopping.getGoname()+"买"+goShopping.getMoney()+"块钱的玩具");
        }else{
            if (this.parentes!=null){
                this.parentes.handRequest(goShopping);
            }
        }
    }
}
